Перейти к основному содержимому

Reseller Get User by ID API

POST /resellerGetUserById

Description

This API endpoint retrieves detailed information about a user associated with a reseller using their user ID.

Request Body

The request uses GraphQL to perform the resellerGetUserById query, which requires an id variable to specify the user's ID.

Query:

query resellerGetUserById ($id: Int) {
resellerGetUserById (id: $id) {
id
email
username
resellerId
role
enabled
radAccess
radAccessClear
createdAt
updatedAt
}
}

GraphQL Variables:

{
"id": 0
}

Example Request:

curl --location '' \
--header 'Content-Type: application/json' \
--data '{"query":"query resellerGetUserById ($id: Int) {\n resellerGetUserById (id: $id) {\n id\n email\n username\n resellerId\n role\n enabled\n radAccess\n radAccessClear\n createdAt\n updatedAt\n }\n}","variables":{"id":1}}'

Response:

  • Success (200 OK):

    • The response includes detailed information about the user associated with the given ID.
    {
    "data": {
    "resellerGetUserById": {
    "id": 1,
    "email": "user@example.com",
    "username": "username123",
    "resellerId": 45,
    "role": "admin",
    "enabled": true,
    "radAccess": true,
    "radAccessClear": false,
    "createdAt": "2023-01-01T12:00:00Z",
    "updatedAt": "2024-01-01T12:00:00Z"
    }
    }
    }
  • Error (4XX/5XX):

    • If there is an issue with the request or server error, the response will include an error message and status code.

Note:

This endpoint is useful for retrieving specific user details within a reseller's organization by providing their user ID. Ensure that the id provided is valid to get accurate results.